package cn.lg.soar.system.feign;

import cn.lg.soar.core.annotations.ApiClient;
import cn.lg.soar.system.api.constant.ModuleConst;
import cn.lg.soar.system.api.model.LogConfigDTO;
import cn.lg.soar.system.api.service.ILogConfigApi;
import cn.lg.soar.system.feign.fallback.LogConfigApiFallbackFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * 操作日志配置
 * @author luguoxiang
 * @date 2021-08-11
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@ConditionalOnMissingClass("cn.lg.soar.message.client.MailApiClient")
@ApiClient
@FeignClient(
        name= ModuleConst.MODULE_NAME,
        path= ModuleConst.CLIENT_PATH + "/log-config",
        fallbackFactory= LogConfigApiFallbackFactory.class,
        contextId="LogConfigApiFeign"
)
public interface LogConfigApiFeign extends ILogConfigApi {

    @GetMapping("getAll")
    @Override
    List<LogConfigDTO> getAll();

}
